home *** CD-ROM | disk | FTP | other *** search
- class CConnectionPoint : public IConnectionPoint
- {
- public:
- // Constructors/Destructors
- CConnectionPoint(void* Owner, IID InterfaceID);
- ~CConnectionPoint(void);
-
- // *** IUnknown methods ***
- STDMETHOD(QueryInterface)(REFIID RefID, void** Obj);
- STDMETHOD_(ULONG, AddRef)(void);
- STDMETHOD_(ULONG, Release)(void);
-
- // IConnectionPoint methods
- STDMETHOD(GetConnectionInterface)(THIS_ IID* InterfaceID) ;
- STDMETHOD(GetConnectionPointContainer)(THIS_
- IConnectionPointContainer** CPContainer) ;
- STDMETHOD(Advise)(THIS_ IUnknown* Sink, DWORD* Cookie) ;
- STDMETHOD(Unadvise)(THIS_ DWORD Cookie) ;
- STDMETHOD(EnumConnections)(THIS_ IEnumConnections** EnumConnections) ;
-
- private:
- unsigned long m_RefCount; // Reference count
- IUnknown* m_Owner; // The owner object of this connection point
- IID m_InterfaceID; // The interface this connection point is wired to
- LArray* m_IUnknown; // List of interfaces that are currently connected
- LArray* m_Cookies; // List of Advise cookies of current connections
- DWORD m_CookieNext; // Next cookie to assign
- };
-